home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / dev / misc / libx11.lha / libX11 / amigax_proto.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-22  |  4.1 KB  |  140 lines

  1. /* Copyright (c) 1996 by Terje Pedersen.  All Rights Reserved   */
  2. /*                                                              */
  3. /* By using this code you will agree to these terms:            */
  4. /*                                                              */
  5. /* 1. You may not use this code for profit in any way or form   */
  6. /*    unless an agreement with the author has been reached.     */
  7. /*                                                              */
  8. /* 2. The author is not responsible for any damages caused by   */
  9. /*    the use of this code.                                     */
  10. /*                                                              */
  11. /* 3. All modifications are to be released to the public.       */
  12. /*                                                              */
  13. /* Thats it! Have fun!                                          */
  14. /* TP                                                           */
  15. /*                                                              */
  16.  
  17. /***
  18.    NAME
  19.      amigax_proto
  20.    PURPOSE
  21.      prototypes for amigaX specific functions
  22.    NOTES
  23.      
  24.    HISTORY
  25.      Terje Pedersen - Feb 17, 1995: Created.
  26. ***/
  27.  
  28. #ifndef AMIGAX_PROTO
  29. #define AMIGAX_PROTO
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. extern struct RastPort *setup_win(Window win);
  36. extern void setup_gc(GC gc);
  37. extern void initfonts(void);
  38. extern void swapwbcm(int,ULONG *);
  39. extern void savewbcm(void);
  40. extern void Xfreecursors(void);
  41.  
  42. extern void clear_subwin(Window,int,int);
  43. extern void clip_begin(int,int,int,int);
  44. extern void clip_exclude(int,int,int,int);
  45.  
  46. extern int defaultfontwidth(void);
  47. extern int defaultfontheight(void);
  48.  
  49. extern void CloseDownScreen(void);
  50. extern int SetupScreen(int width,int height,int depth,ULONG id);
  51. extern void CloseDownScreen(void);
  52. extern void CloseBackdropWindow(void);
  53. extern int OpenBackdropWindow(int,int,int,int);
  54. extern Window AmigaCreateWindow(int,int,int,int,ULONG);
  55. extern int OpenLibraries(void);
  56. extern void CloseLibraries(void);
  57. extern void report_display(void);
  58. extern void force_exit(int);
  59. extern int open_timer(void);
  60. extern void close_timer(void);
  61. extern void init_backrp(void);
  62.  
  63. extern struct BitMap *alloc_bitmap(int width,int height,int depth,int flags);
  64. extern int free_bitmap(struct BitMap *bmp);
  65.  
  66. #define CHILDRENAVAIL 100
  67.  
  68. #ifndef         S_ISDIR         /* missing POSIX-type macros */
  69. #define       S_ISDIR(mode)   (((mode)&S_IFMT) == S_IFDIR)
  70. #define       S_ISBLK(mode)   (((mode)&S_IFMT) == S_IFBLK)
  71. #define       S_ISCHR(mode)   (((mode)&S_IFMT) == S_IFCHR)
  72. #define       S_ISREG(mode)   (((mode)&S_IFMT) == S_IFREG)
  73. #endif
  74. #ifndef         S_ISFIFO
  75. #  ifdef        S_IFIFO
  76. #    define     S_ISFIFO(mode)  (((mode)&S_IFMT) == S_IFIFO)
  77. #  else
  78. #    define     S_ISFIFO(mode)  0
  79. #  endif
  80. #endif
  81. #ifndef         S_ISLINK
  82. #  ifdef        S_IFLNK
  83. #    define     S_ISLINK(mode)  (((mode)&S_IFMT) == S_IFLNK)
  84. #  else
  85. #    define     S_ISLINK(mode)  0
  86. #  endif
  87. #endif
  88. #ifndef         S_ISSOCK
  89. #  ifdef        S_IFSOCK
  90. #    define     S_ISSOCK(mode)  (((mode)&S_IFMT) == S_IFSOCK)
  91. #  else
  92. #    define     S_ISSOCK(mode)  0
  93. #  endif
  94. #endif
  95.  
  96. #include <stdio.h>
  97. #include <memwatch.h> /* To enable memlib, you must #define MWDEBUG to 1 */
  98.  
  99. #define X11WINDOW 1
  100. #define X11BITMAP 2
  101. #define X11SUBWINDOW 3
  102. #define X11MUI 4
  103. #define X11ROOT 5
  104.  
  105. extern char *X11Drawables,*X11DrawablesBackground;
  106. extern int *X11DrawablesSubWindows;
  107. extern GC *X11GC;
  108. extern int *X11DrawablesMap,*X11DrawablesWindowsInvMap;
  109. extern int X11NumDrawables,X11NumDrawablesWindows,X11NumDrawablesBitmaps;
  110. extern int X11NumDrawablesSubWindows,X11NumGC,X11AvailGC;
  111. extern long *X11DrawablesMask;
  112. extern int X11NumMUI;
  113. extern Cursor *X11DrawablesMUICursor;
  114.  
  115. typedef struct {
  116.   int x,y,width,height;
  117.   int depth;
  118.   int parent;
  119.   char background;
  120.   char mapped;
  121.   Cursor cursor;
  122.   Window win;
  123.   char *name;
  124.   Pixmap pixmap;
  125. } _ActualWindow;
  126.  
  127. extern _ActualWindow *X11ActualWindows;
  128.  
  129. extern void X11AddInternal(Window,int,int);
  130. extern void X11AddInternalEvent(Window,int,int);
  131. extern void stackcheck(int);
  132. extern char *getdisplayname(ULONG);
  133. extern int get_intuievent(XEvent *event);
  134. void X11ScanFile(FILE *fp);
  135. #ifdef __cplusplus
  136. }
  137. #endif
  138.  
  139. #endif /* AMIGAX_PROTO */
  140.